package com.etl.user.common.enums;

/**
 * @author Arnold Yand
 * @summary 用户类型
 * @time 2018/3/24 17:56
 */
public enum UserType {

  NORMAL(0, "普通用户"),
  ;

  private int code;
  private String label;
  private UserType(int code, String label){
    this.code = code;
    this.label = label;
  }

  public UserType parse(int code){
    for(UserType v : UserType.values()){
      if(v.code == code){
        return v;
      }
    }
    return NORMAL;
  }
}
